/**
 * @Company: 北京慧点科技有限公司 | www.smartdot.com.cn
 * @Copyright 1998-2020 © Smartdot Technologies Co., Ltd.
 */
package com.springlearn.zhoufei.other.spring.demo1;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * Bean后置处理器
 *
 * @author <a href="mailto:zhoufei@smartdot.com.cn">zhoufei</a>
 * @class: Hello
 * @date 2020/9/18 20:08
 * @Verson 1.0 -2020/9/18 20:08
 * @see
 */
public class BeanPostProcessorImpl implements BeanPostProcessor {
    
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("所有bean 初始化方法前,执行动作");
        System.out.println("当前bean：" + beanName);
        return null;
    }
    
    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("所有bean 初始化方法后,执行动作");
        System.out.println("当前bean：" + beanName);
        return null;
    }
}